<include file="Public/head" />
</head>
<include file="Public/common_header" />
<div class="mian">
<include file="Public/sidebar"  menu="shgl.gh" />
<div class="mianR">
<h3 class="yonghu">待过户信息</h3>
<div class="chezhu-xinxi">
    <div class="xinxi-conter xinxi-conter1" style="background: none;margin-bottom:10px;border: none">
        <h4 class="order_no">拍卖单号：<b>{$transferInfo.order_no}</b></h4>
    </div>
  <div class="transfer">
      <div class="xinxi-conter xinxi-conter1">
        <h4>车辆信息</h4>
        <ul>
            <li class="clearfix">
                <em>车型</em><em class="name-text">{$transferInfo.model}</em>
                <em>排放标准</em><em class="dian-hua"><?php echo C('EMISSION')[$transferInfo['emission']];?></em>
            </li>

            <li class="clearfix">
                <em>初登日期</em><em class="name-text">{$transferInfo.first_reg_date}</em>
                <em>颜色</em><em class="dian-hua"><?php echo C('CAR_COLOR')[$transferInfo['car_color']];?></em>
            </li>
            <li class="clearfix">
                <em>表显里程</em><em class="name-text">{$transferInfo.pointer_mileage}万公里</em>
                <em>车况级别</em><em class="name-text">{$transferInfo.composite_state}{$transferInfo.accident_level}</em>
            </li>
            <li class="clearfix">
                <em>车辆注册地</em><em class="name-text">{$transferInfo.reg_city}</em>
                <em>所在地</em><em class="name-text">{$transferInfo.location_area}</em>
            </li>
            <li class="clearfix">
                <em>车牌号</em><em class="name-text">{$transferInfo.plate}</em>
                <em>车架号</em><em class="name-text">{$transferInfo.vin}</em>
            </li>
            <li class="clearfix">
                <em>年检有效期</em><em class="name-text">{$transferInfo.verify_expiry}</em>
                <em>交强险有效期</em><em class="name-text">{$transferInfo.com_insure_expiry}</em>
            </li>
            <li class="clearfix">
                <em>渠道来源</em><em class="name-text">
                    <if condition="$transferInfo.comefrom neq ''">
                    <?php if(empty($transferInfo['comefrom_url'])):?>
                      <?php echo $show_from[$transferInfo['comefrom']];?>
                    <?php else: ?>
                      <a href="{$transferInfo.comefrom_url}" target="_blank" rel="noreferrer"><?php echo $show_from[$transferInfo['comefrom']];?></a>
                    <?php endif;?>
                    <else/>
                      未知
                    </if>
                </em>
                <em>最终成交价</em><em class="name-text">{$transferInfo.last_trans_price} 元</em>
            </li>
        </ul>
      </div>
      <br/>
      <div class="xinxi-conter xinxi-conter1">
        <h4>过户信息</h4>
        <ul>
            <li class="clearfix">
                <em>过户限制</em><em class="name-text">{$transferInfo.transfer_limit}</em>
                <em>开票要求</em><em class="name-text">{$transferInfo.invoice} 元</em>
            </li>
            <li class="clearfix">
                <em>车辆落户</em>
                <em class="name-text">--</em>
                <em>过户要求</em><em class="name-text">{$transferInfo.transfer_type}</em>
            </li>
            <?php if(!empty($transferInfo['procedures_upload'])):?>
                 <li class="clearfix procedures">
                    <em class="uploadText1">手续上传要求</em><em class="name-text uploadText" style="width:827px;">{$transferInfo.procedures_upload}</em>
                </li>
            <?php endif;?>
            <li class="clearfix ">
                <em>车辆补充说明</em>
                <em class="name-text supplement" style="width:827px;">{$transferInfo.other_info}</em>
            </li>
        </ul>
      </div>
      <br/>
    <div class="xinxi-conter xinxi-conter1">
        <h4>复检信息</h4>
        <ul>
            <li class="clearfix">
                <em>手续复检人</em><em class="name-text">{$transferInfo.procedures_name}</em>
                <em>车况复检人</em><em class="name-text">{$transferInfo.check_name} </em>
            </li>
            <li class="clearfix">
                <em>复检时间</em><em class="name-text">{$transferInfo.recheck_time}</em>
                <em>核实手续</em><em class="name-text">{$transferInfo.procedures}</em>
            </li>
            <li class="clearfix ">
                <em>复检备注</em>
                <em class="name-text supplement" style="width:827px;">{$transferInfo.recheck_remark}</em>
            </li>
        </ul>
    </div>
    <br/>
      <div class="xinxi-conter xinxi-conter1">
        <h4>原车主信息</h4>
        <ul>
            <li class="clearfix">
                <em>车主类型</em><em class="name-text">{$transferInfo.owner_type_name}</em>
                <if condition="$transferInfo.owner_type eq 1">
                    <em>原车主姓名</em><em class="name-text">{$transferInfo.seller_name}</em>
                    <else />
                    <em>原公司名称</em><em class="dian-hua">{$transferInfo.seller_name}</em>
                </if>
            </li>
            <li class="clearfix">
                <if condition="$transferInfo.owner_type eq 1">
                    <em>原联系电话</em><em class="name-text">{$transferInfo.phone}</em>
                    <else />
                    <em>原联系人姓名</em><em class="name-text">{$transferInfo.contact_person}</em>
                    <em>原联系电话</em><em class="dian-hua">{$transferInfo.phone}</em>
                </if>
            </li>
            <input type="hidden" name="owner_id" value="{$transferInfo.owner_id}"  id="owner_id" />
        </ul>
      </div>
    <br/>
      <div class="xinxi-conter xinxi-conter1">
        <h4>评估师信息</h4>
        <ul>
            <li class="clearfix">
                <em>评估师</em><em class="name-text">{$transferInfo.real_name}</em>
                <em>评估师电话</em><em class="dian-hua">{$transferInfo.mobile}</em>
            </li>
            <!-- <input type="hidden" name="owner_id" value="{$transferInfo.owner_id}"  id="owner_id" /> -->
        </ul>
      </div>
      <br/>
      <div class="xinxi-conter xinxi-conter1">
        <h4>车商信息</h4>
        <ul>
            <li class="clearfix">
                <em>车商联系人</em><em class="name-text">{$transferInfo.dealer_contact_person}</em>
                <em>联系人电话</em><em class="dian-hua">{$transferInfo.dealer_contact_mobile}</em>
            </li>
        </ul>
      </div>
      <br/>
      <div class="xinxi-conter xinxi-conter1">
        <h4>备注信息</h4>
        <ul>
            <li class="clearfix">
                <em>付首款备注</em><em class="name-text">{$transferInfo.pay_log_mark}</em>
            </li>
        </ul>
      </div>
    </div>
  </div>

  <?php if($transferInfo['car_source'] == 1):?> <!-- 如果是4s店 车源时-->
    <h3 class="cha">手续上传要求</h3>
    <div class="transfer-want">
        <div class="transfer-front clearfix">
            <dl class="clearfix" style="height: 310px;">
                <dt style="height: 310px;">
                    <span style="margin-top: 134px;">过户前</span>
                </dt>
                <empty name="beforeTransfer">
                    <dd class="not-upload">无上传要求</dd>
                </empty>
                <dd>
                    <ul >
                        <?php foreach($beforeTransfer as $pb):?>
                        <li data-id="1" class="clearfix">
                            <span>{$pb.certificate_name}</span>
                            <input type="button" class="<?php echo ($pb['certificate_image_type']==1 || $pb['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="1" value="照片" >
                            <input type="button" class="<?php echo ($pb['certificate_image_type']==2 || $pb['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="2" value="扫描件">
                        </li>
                        <?php endforeach;?>
                    </ul>
                </dd>
            </dl>
            <dl class="clearfix" style="margin-left:24px;">
                <dt style="height: 310px;"><span style="margin-top: 134px;">过户后</span></dt>
                <empty name="afterTransfer">
                    <dd class="not-upload">无上传要求</dd>
                </empty>
                <dd>
                    <ul>
                        <?php foreach($afterTransfer as $pa):?>
                        <li data-id="2" class="clearfix">
                            <span>{$pa.certificate_name}</span>
                            <input type="button" class="<?php echo ($pa['certificate_image_type']==1 || $pa['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="1" value="照片" >
                            <input type="button" class="<?php echo ($pa['certificate_image_type']==2 || $pa['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="2" value="扫描件">
                        </li>
                        <?php endforeach;?>
                    </ul>
                </dd>
            </dl>
        </div>
    </div>
  <?php endif;?>

<div class="listBox">
  <div class="yuList">
    <div class="xuanzhe1">
        <ul>
            <form id="transForm" name="transForm">
            <input type="hidden" name="transfer_id" value="{$transferInfo.transfer_id}"/>
                <li class="transfer">
                    <input id="transfer_limit_id" type="hidden" name="transfer_limit_id" value="{$transferInfo.transfer_limit_id}">
                    <span>车辆落户</span>
                    <?php if (!isset($transferInfo['transfer_limit_id']) || $transferInfo['transfer_limit_id']==3) { ?>
                    <em class="" data-id="1" onclick="$('#transfer_limit_id').val(1);">本地</em>
                    <em class="" data-id="2" onclick="$('#transfer_limit_id').val(2);">外迁</em>
                    <?php } elseif ($transferInfo['transfer_limit_id']==1) { ?>
                    <em class="active" data-id="1" onclick="$('#transfer_limit_id').val(1);">本地</em>
                    <?php } elseif ($transferInfo['transfer_limit_id']==2) { ?>
                    <em class="active" data-id="2" onclick="$('#transfer_limit_id').val(2);">外迁</em>
                    <?php } ?>
                </li>
                <li>
                    <span>过户截止时间</span>
                    <em><input id="transfer_end_time" type="text" name="transfer_end_time" value="" placeholder="请选择过户截止时间" readonly="" class="transfer_end_time xiaci"></em>
                </li>
                <li class="reason clearfix">
                    <span>备注</span>
                    <textarea name="reauction_remark" cols="50"
                              onKeyDown="textCounter(this.form.reauction_remark, this.form.remLen, 50);" onKeyUp="textCounter(this.form.reauction_remark, this.form.remLen, 50);"></textarea>
                    <em></em>
                </li>
            </form>
        </ul>
    </div>

    <div class="yongBtn">
      <input id="confirm_transfer" type="button" value="确认过户" class="queding">
      <input name="重置" type="reset" onclick="history.back();" class="quxiao" value="返回"></div>
  </div>
</div>
</div>
</body>
</html>
<script type="text/javascript">
    $(".transfer_end_time").ymdateplugin({
            showTimePanel: true,
            changeMonth: true,
            changeYear: true
        });
    $(document).ready(function () {
        $(".yuList ul .transfer em").click(function () {
            $(".yuList ul .transfer em").removeClass("active");
            $("#transfer_limit").val($(this).attr('data-id'));
            $(this).addClass("active");
        })
    });

    $("#confirm_transfer").click(function(){
        $.post("/CarTransfer/confirmTransfer",$("#transForm").serialize(),function(data){
            if(data.code!=200){
                shibai_alert(data.msg,1500)
                return false;
            }
            btn_alert("确认成功",1500,function(){
                //location.href=document.referrer
                submit_success();
            });            
        },"json");
    });

    //提交成功后
    function submit_success() {
        var order_type_new = "{:I('get.order_type')}";
        var Request = new UrlSearch(); //实例化
        var order_type = Request.order_type;
        if(order_type == '' || order_type == null){ //如果没有传 order_type ,就追加上order_type 然后返回
            location.href = document.referrer+"?order_type="+"{:I('get.order_type')}";
        }else{
            if(order_type_new == order_type){ //如果新的order_type 和 来源的order_type 一致。那么直接返回
                location.href=document.referrer;
            }else{ //否则更新成新的 order_type
                var num = document.referrer.indexOf("?")
                var url_no_parameter = document.referrer.substr(0,num);
                location.href = url_no_parameter+"?order_type="+"{:I('get.order_type')}";
            }
        }

        return;
    }
    
    //初始化url地址
    function UrlSearch()
    {
        var name,value;
        var str = document.referrer; //url地址
        var num = str.indexOf("?")
        str = str.substr(num+1); //取得所有参数   stringvar.substr(start [, length ]

        var arr=str.split("&"); //各个参数放到数组里
        for(var i=0;i < arr.length;i++){
            num=arr[i].indexOf("=");
            if(num>0){
                name=arr[i].substring(0,num);
                value=arr[i].substr(num+1);
                this[name]=value;
            }
        }
    }
</script>